import React from 'react';
import { Route, Switch, Redirect } from "dva/router";
import { AsyncSign, AsyncApp, AsyncTest, AsyncDrag, AsyncImagePreview } from './asyncComponent';
import ImagePreview from './pages/imagePreview'
const Routes = (props) => {
    const history = { props };
    return (
        <Switch>
            <Route path="/image" exact history={history} component={ImagePreview} />
            <Route path="/test" exact history={history} component={AsyncTest} />
            <Route path="/" exact history={history} component={AsyncApp} />
            <Route path="/drag" exact history={history} component={AsyncDrag} />
            <Route path="/sign" exact history={history} component={AsyncSign} />
            <Redirect to="/" />
        </Switch>
    );
}

export default Routes;